package org.hose.core;

/**
 * 测试用例步骤
 * 1. 步骤描述
 * 2. 步骤命令
 * 3. 操作元素
 * 4. 步骤参数
 */
public class TestCaseStep {

    // 步骤描述
    private String description;

    // 步骤命令，如点击、输入、验证等
    private String command;

    // 操作元素，如页面上的某个按钮或输入框的标识符
    private String targetElement;

    // 步骤参数，可以是键值对形式的数据，如输入的内容、预期的结果等
    private String parameter;

    /**
     * 构造函数，初始化测试用例步骤
     * @param description 步骤描述
     * @param command 步骤命令
     * @param targetElement 操作元素标识符
     * @param parameter 步骤参数
     */
    public TestCaseStep(String description, String command, String targetElement, String parameter) {
        this.description = description;
        this.command = command;
        this.targetElement = targetElement;
        this.parameter = parameter;
    }

    // getter 和 setter 方法
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCommand() {
        return command;
    }

    public void setCommand(String command) {
        this.command = command;
    }

    public String getTargetElement() {
        return targetElement;
    }

    public void setTargetElement(String targetElement) {
        this.targetElement = targetElement;
    }

    public String getParameter() {
        return parameter;
    }

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    @Override
    public String toString() {
        return "TestCaseStep{" +
                "description='" + description + '\'' +
                ", command='" + command + '\'' +
                ", targetElement='" + targetElement + '\'' +
                ", parameters=" + parameter +
                '}';
    }
}

